#pragma once

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

namespace dtkm {

	/// <summary>
	/// Summary for FrmPayUI
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class FrmPayUI : public System::Windows::Forms::Form
	{
	public:
		
		FrmPayUI(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~FrmPayUI()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Panel^  panel1;
	protected: 
	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::TextBox^  txtOrderList;
	private: System::Windows::Forms::Button^  btnCancelOrder;

	private: System::Windows::Forms::Button^  btnChangeItem;
	private: System::Windows::Forms::Button^  btnComplete;

	private: System::Windows::Forms::TextBox^  tbxAmountReceived;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::TextBox^  tbxOrderNumber;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::Button^  btnDone;




	private:
		int retrievedOrder;
		//Order* order;
	private: System::Windows::Forms::Label^  label3;
			 /// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->panel1 = (gcnew System::Windows::Forms::Panel());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->txtOrderList = (gcnew System::Windows::Forms::TextBox());
			this->btnCancelOrder = (gcnew System::Windows::Forms::Button());
			this->btnChangeItem = (gcnew System::Windows::Forms::Button());
			this->btnComplete = (gcnew System::Windows::Forms::Button());
			this->tbxAmountReceived = (gcnew System::Windows::Forms::TextBox());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->tbxOrderNumber = (gcnew System::Windows::Forms::TextBox());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->btnDone = (gcnew System::Windows::Forms::Button());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->panel1->SuspendLayout();
			this->SuspendLayout();
			// 
			// panel1
			// 
			this->panel1->Controls->Add(this->label5);
			this->panel1->Controls->Add(this->txtOrderList);
			this->panel1->Location = System::Drawing::Point(260, 12);
			this->panel1->Name = L"panel1";
			this->panel1->Size = System::Drawing::Size(276, 224);
			this->panel1->TabIndex = 28;
			this->panel1->Visible = false;
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->Font = (gcnew System::Drawing::Font(L"Arial Black", 10, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label5->ForeColor = System::Drawing::Color::Firebrick;
			this->label5->Location = System::Drawing::Point(3, 13);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(106, 19);
			this->label5->TabIndex = 27;
			this->label5->Text = L"Your Order...";
			// 
			// txtOrderList
			// 
			this->txtOrderList->Location = System::Drawing::Point(3, 35);
			this->txtOrderList->Multiline = true;
			this->txtOrderList->Name = L"txtOrderList";
			this->txtOrderList->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
			this->txtOrderList->Size = System::Drawing::Size(270, 186);
			this->txtOrderList->TabIndex = 0;
			// 
			// btnCancelOrder
			// 
			this->btnCancelOrder->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->btnCancelOrder->Location = System::Drawing::Point(44, 151);
			this->btnCancelOrder->Name = L"btnCancelOrder";
			this->btnCancelOrder->Size = System::Drawing::Size(152, 44);
			this->btnCancelOrder->TabIndex = 29;
			this->btnCancelOrder->Text = L"Cancel Order";
			this->btnCancelOrder->UseVisualStyleBackColor = true;
			this->btnCancelOrder->Visible = false;
			this->btnCancelOrder->Click += gcnew System::EventHandler(this, &FrmPayUI::btnCancelOrder_Click);
			// 
			// btnChangeItem
			// 
			this->btnChangeItem->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->btnChangeItem->Location = System::Drawing::Point(44, 85);
			this->btnChangeItem->Name = L"btnChangeItem";
			this->btnChangeItem->Size = System::Drawing::Size(152, 44);
			this->btnChangeItem->TabIndex = 30;
			this->btnChangeItem->Text = L"Add or Remove";
			this->btnChangeItem->UseVisualStyleBackColor = true;
			this->btnChangeItem->Visible = false;
			this->btnChangeItem->Click += gcnew System::EventHandler(this, &FrmPayUI::btnChangeItem_Click);
			// 
			// btnComplete
			// 
			this->btnComplete->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->btnComplete->Location = System::Drawing::Point(260, 317);
			this->btnComplete->Name = L"btnComplete";
			this->btnComplete->Size = System::Drawing::Size(209, 44);
			this->btnComplete->TabIndex = 31;
			this->btnComplete->Text = L"Payment Complete";
			this->btnComplete->UseVisualStyleBackColor = true;
			this->btnComplete->Visible = false;
			this->btnComplete->Click += gcnew System::EventHandler(this, &FrmPayUI::btnComplete_Click);
			// 
			// tbxAmountReceived
			// 
			this->tbxAmountReceived->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->tbxAmountReceived->Location = System::Drawing::Point(260, 282);
			this->tbxAmountReceived->Name = L"tbxAmountReceived";
			this->tbxAmountReceived->Size = System::Drawing::Size(208, 29);
			this->tbxAmountReceived->TabIndex = 32;
			this->tbxAmountReceived->Visible = false;
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->label1->Location = System::Drawing::Point(285, 255);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(161, 24);
			this->label1->TabIndex = 33;
			this->label1->Text = L"Amount Received";
			this->label1->Visible = false;
			// 
			// tbxOrderNumber
			// 
			this->tbxOrderNumber->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->tbxOrderNumber->Location = System::Drawing::Point(217, 161);
			this->tbxOrderNumber->Name = L"tbxOrderNumber";
			this->tbxOrderNumber->Size = System::Drawing::Size(179, 29);
			this->tbxOrderNumber->TabIndex = 34;
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->label2->Location = System::Drawing::Point(213, 121);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(183, 24);
			this->label2->TabIndex = 35;
			this->label2->Text = L"Enter Order Number";
			// 
			// btnDone
			// 
			this->btnDone->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->btnDone->Location = System::Drawing::Point(217, 206);
			this->btnDone->Name = L"btnDone";
			this->btnDone->Size = System::Drawing::Size(178, 41);
			this->btnDone->TabIndex = 36;
			this->btnDone->Text = L"Done";
			this->btnDone->UseVisualStyleBackColor = true;
			this->btnDone->Click += gcnew System::EventHandler(this, &FrmPayUI::btnDone_Click);
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(128)));
			this->label3->Location = System::Drawing::Point(234, 285);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(20, 24);
			this->label3->TabIndex = 37;
			this->label3->Text = L"$";
			this->label3->Visible = false;
			// 
			// FrmPayUI
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->BackColor = System::Drawing::SystemColors::ButtonHighlight;
			this->ClientSize = System::Drawing::Size(602, 385);
			this->Controls->Add(this->label3);
			this->Controls->Add(this->btnDone);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->tbxOrderNumber);
			this->Controls->Add(this->label1);
			this->Controls->Add(this->tbxAmountReceived);
			this->Controls->Add(this->btnComplete);
			this->Controls->Add(this->btnChangeItem);
			this->Controls->Add(this->btnCancelOrder);
			this->Controls->Add(this->panel1);
			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedToolWindow;
			this->Name = L"FrmPayUI";
			this->Text = L"Pay Window";
			this->panel1->ResumeLayout(false);
			this->panel1->PerformLayout();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion

private: void ShowMain(bool option) {
			//Visibility for controls that inputting order number
			this->label2->Visible = !option;
			this->tbxOrderNumber->Visible = !option;
			this->btnDone->Visible = !option;
			
			//Visibility for controls for main pay window
			this->panel1->Visible = option;
			this->btnCancelOrder->Visible = option;
			this->btnChangeItem->Visible = option;
			this->btnComplete->Visible = option;
			this->label1->Visible = option;
			this->tbxAmountReceived->Visible = option;
			this->label3->Visible = option;
				
		}

private: System::Void btnDone_Click(System::Object^  sender, System::EventArgs^  e) {
			/*retrievedOrder = Convert::ToInt32(this->tbxOrderNumber->Text->ToString());
			order = new Order(retrievedOrder);
			txtOrderList->Text =  gcnew String(order->GetCartAsTextList().c_str());*/
			ShowMain(true);
		 }
		 
private: System::Void btnComplete_Click(System::Object^  sender, System::EventArgs^  e) {
			ShowMain(false);
		 }
private: System::Void btnCancelOrder_Click(System::Object^  sender, System::EventArgs^  e) {
			ShowMain(false);
		 }
private: System::Void btnChangeItem_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
};
}
